﻿using System.Windows.Forms;

namespace Pibby.Controls
{
	public partial class HeadedTree : UserControl
	{
		public HeadedTree()
		{
			InitializeComponent();

			this.contentTree.ShowRootLines = false;
			this.contentTree.ShowLines = true;
			this.contentTree.HideSelection = false;
		}

		public void Configure(string text, ImageList imageList)
		{
			this.headerLabel.Text = text;
			this.contentTree.ImageList = imageList;

			if (imageList.ColorDepth != this.contentTree.ImageList.ColorDepth)
			{
				this.contentTree.ImageList.ColorDepth = imageList.ColorDepth; // ColorDepth.Depth32Bit;
			}
		}
	}
}
